<?php

	namespace Emoney\EpayBundle\Manager;

	use Doctrine\ORM\EntityManager;
	use Emoney\EpayBundle\Manager\BaseManager;
	use Emoney\EpayBundle\Entity\Sitename;
	 
	class SitenameManager extends BaseManager
	{
		protected $em;
		 
		public function __construct(EntityManager $em)
		{
			$this->em = $em;
		}

		public function loadSite($site_id) {
			return $this->getRepository()->findOneBy(array('id' => $site_id));
		}
		
		public function getSites($siteId) {
			return $this->getRepository()->getPayments(array('siteId' => $siteId));
		}
		/**
		* Save store entity
		*
		* @param Desk $desk
		*/
		public function saveSite(StorePayement $storePayement)
		{
			$this->persistAndFlush($storePayement);
		}
		 
		public function getPayementBySite($siteId) {
			return $this->getRepository()
			->getPayments($siteId);
		}
		
		
		 
		public function getRepository()
		{
			return $this->em->getRepository('EmoneyEpayBundle:Sitename');
		}

}